import React from 'react'

export default function TabbarItem({title,index,onIndex,currentIndex,icon,activeIcon,onClick}) {
    // console.log(index)
    return (
        <li
         onClick={onIndex(index)}
         className={index===currentIndex?'active':''}
        //  onClick={onClick}
         >
             <span className='icon'>
                {
                    index===currentIndex ? activeIcon : icon
                }
             </span>
             <span className='title'>{title}</span>
            
        
        </li>
        
    )
}
